package src.base;

import java.util.Random;

public class Gauss 
{
	public Random x;
	public Random y;
	public int m;
	public int e;
	
	public Gauss(int seed_x, int seed_y, int m, int e)
	{
		this.x = new Random(seed_x);
		this.y = new Random(seed_y);
		this.m = m;
		this.e = e;
	}
	
	public int nextInt()
	{		
		return (int) Math.round(m + e * ( Math.cos( 2 * Math.PI * x.nextDouble() ) * Math.sqrt( -2 * Math.log( y.nextDouble() ))));
	}
}
